#{extends 'main.html' /}
#{set title:'Book ' + hotel.name /}
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        #{set 'moreScripts'}
		    <script src="@{'/public/javascripts/jquery-ui-1.7.2.custom.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
		#{/set}
		#{set 'moreStyles'}
		    <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/ui-lightness/jquery-ui-1.7.2.custom.css'}" />
		#{/set}
        <script type="text/javascript" charset="${_response_encoding}">
		    $(function() {
				$(".datepicker").datepicker({dateFormat: 'yy-mm-dd'});
			});
		</script>
    </head>
<body>
	#{form @confirmBooking(hotel.id)}
	    <p>
	        <strong>院线名称:</strong> ${hotel.name}
	    </p>
	    <p>
	        <strong>地址:</strong> ${hotel.address}
	    </p>
	    <p>
	        <strong>省市:</strong> ${hotel.city}
	    </p>
	    <p>
	        <strong>州区:</strong> ${hotel.state}
	    </p>
	    <p>
	        <strong>编号:</strong> ${hotel.zip}
	    </p>
	    <p>
	        <strong>国家:</strong> ${hotel.country}
	    </p>
	    <p>
	        <strong>票价:</strong> ${hotel.price}
	    </p>
	    #{field 'booking.checkinDate'}
	        <p class="${field.errorClass}">
	            <strong>开始日期:</strong> 
	            <input type="text" size="10" name="${field.name}" class="datepicker" value="${booking?.checkinDate?.format('yyyy-MM-dd')}"> *
	            <span class="error">${field.error}</span>
	        </p>
	    #{/field}
	    #{field 'booking.checkoutDate'}
	        <p class="${field.errorClass}">
	            <strong>结束日期:</strong> <input type="text" size="10" name="${field.name}" class="datepicker" value="${booking?.checkoutDate?.format('yyyy-MM-dd')}"> *
	            <span class="error">${field.error}</span>
	        </p>
	    #{/field}
	    <p>
	        <strong>座位优先权:</strong> 
	        #{select 'booking.beds', value:booking?.beds}
	            #{option 1}前排#{/option}
	            #{option 2}中间#{/option}
	            #{option 3}后面#{/option}
	        #{/select}
	    </p>
	    <p>
	        <strong>是否满意:</strong> 
	        <input type="radio" name="booking.smoking" value="true" ${booking?.smoking ? 'checked' : ''}> 不满意
	        <input type="radio" name="booking.smoking" value="false" ${booking?.smoking ? '' : 'checked'}> 满意
	    </p>
	   #{field 'booking.creditCard'}
	        <p class="${field.errorClass}">
	            <strong>信用卡号码:</strong> 
	            <input type="text" name="${field.name}" size="16" value="${booking?.creditCard}"> *
	            <span class="error">${field.error}</span>
	        </p>
	    #{/field}
	    #{field 'booking.creditCardName'}
	        <p class="${field.errorClass}">
	            <strong>信用卡名称:</strong> 
	            <input type="text" name="${field.name}" size="16" value="${booking?.creditCardName}"> *
	            <span class="error">${field.error}</span>
	        </p>
	    #{/field} 
	    <p>
	        <strong>观影日期:</strong> 
	        #{select 'booking.creditCardExpiryMonth', value:booking?.creditCardExpiryMonth}
	            #{option 1}Jan#{/option}
	            #{option 2}Feb#{/option}
	            #{option 3}Mar#{/option}
	            #{option 4}Apr#{/option}
	            #{option 5}May#{/option}
	            #{option 6}Jun#{/option}
	            #{option 7}Jul#{/option}
	            #{option 8}Aug#{/option}
	            #{option 9}Sep#{/option}
	            #{option 10}Oct#{/option}
	            #{option 11}Nov#{/option}
	            #{option 112}Dec#{/option}
	        #{/select}
	        #{select 'booking.creditCardExpiryYear', value:booking?.creditCardExpiryYear}
	            #{option 2008}2014#{/option}
	            #{option 2009}2013#{/option}
	            #{option 2010}2012#{/option}
	            #{option 2011}2011#{/option}
	            #{option 2012}2010#{/option}
	        #{/select}      
	    </p>    
	    <p class="buttons">
	        <input type="submit" value="继续"> 
	        <a href="@{show(hotel.id)}">取消</a>    
	    </p>
	#{/form}
</body>